package com.zzhou.linkinfo.clock.selector;

import android.util.Log;

/**
 * <desc>
 * Created by The Moss on 2019/3/13.
 */

public class ClockModelCreator {
    private ApiRequest request;

    private ClockModelCreator(){
    }
    private static class CreatorHolder{
        private static ClockModelCreator creator = new ClockModelCreator();
    }
    public static ClockModelCreator getInstance(){
        return CreatorHolder.creator;
    }
    public ClockModelCreator setRequest(ApiRequest request){
        this.request = request;
        return this;
    }

    public ApiRequest getRequest() {
        if (request == null) {
            Log.e("ClockModelCreator","ApiRequest is null");
            throw new NullPointerException("ApiRequest is null");
        }
        return request;
    }
}
